package org.example.boot.mybatis.pius.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.boot.mybatis.pius.bean.Stu;
import org.example.boot.mybatis.pius.mapper.StuMapper;
import org.example.boot.mybatis.pius.service.StuService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class StuServicelmpl extends ServiceImpl<StuMapper, Stu> implements StuService {
@Override
//    @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
    public void piliangcaozuo(List<Stu> list) {
        list.forEach(e -> {
            updateById(e);
        });
    }
}
